import React from 'react';
export const List = ({ list, fruits }) => {
  return (
    <table
      style={{ width: '400px', margin: '0 auto', border: '1px solid #ddd' }}
    >
      <thead>
        <tr>
          <th>名称</th>
          <th>归属</th>
        </tr>
      </thead>
      <tbody>
        {list.map((item, index) => {
          return (
            <tr key={item.id}>
              <td>{item.name}</td>
              <td>{item.organization}</td>
              {/* <td>
                {fruits.find((fruit) => fruit.id === item.personId)?.name ||
                  '未知'}
              </td> */}
            </tr>
          );
        })}
      </tbody>
    </table>
  );
};
